<?php
	include 'connectdb.php';
	if (isset($_POST['product_code'])){
		$product_code = $_POST['product_code'];		

	    $sql1 = "SELECT sale_price from product WHERE code = '".$product_code."'";
	    $prices = mysql_fetch_array(mysql_query($sql1));
	    $price = $prices['sale_price'];	    
	    	    
	    $arr['price'] = $price;
    	echo json_encode($arr); 
    }
    else{
    	header("HTTP/1.0 404 Not Found");
        header('HTTP', true, 500);
    }

?>